let TaskApp = new Vue({
    el:"#taskApp",
    data:{
        status:0,
        works:[],
        pageInfo:{},
        pageSize:5
    },
    methods:{
        loadWorks(id,pageNum){
            if(id=="noAnswer"){
                this.status = 0
            }else if(id=="unSolve"){
                this.status = 1
            }else if(id=="solved"){
                this.status = 2
            }
            axios.get('/portal/question/works/'+pageNum+'/'+this.pageSize+'/'+this.status)
                .then(result=>{
                    let r = result.data
                    console.log(r)
                    if(r.code == OK){
                        this.pageInfo = r.data
                        this.works = r.data.list
                    }
                })
        }
    },
    created(){
        this.loadWorks("noAnswer",1)
    }
})